#include <iostream>
#include <algorithm>
#include <string>
#include <set>
#include <vector>
#define int unsigned long long
//#define int long long
#define all(x) x.begin(), x.end()
using namespace std;

void solve()
{
	int n; cin >> n;
	vector<int> arr(2 * n);
	for (auto& e : arr) cin >> e;

	int ans = 0, odd = 0, eve = 0;
	for (int i = 0; i < 2 * n; i += 2) odd += arr[i + 1] - arr[i];
	for (int i = 1; i + 1 < 2 * n; i += 2) eve += arr[i + 1] - arr[i];
	for (int t = 0; t < n; ++t)
	{
		if (t) ans += arr[2 * n - t] - arr[t - 1];

		if (t / 2 > 0)
		{
			if (t % 2 == 0)
			{
				odd -= (arr[t - 1] - arr[t - 2]) + (arr[2 * n - t + 1] - arr[2 * n - t]);
			}
			else
			{
				eve -= (arr[t - 1] - arr[t - 2]) + (arr[2 * n - t + 1] - arr[2 * n - t]);
			}
		}
		if (t % 2 == 0) cout << ans + odd << ' ';
		else cout << ans + eve << ' ';
	}

//	for (int k = 1; k <= n; ++k)
//{
//	int ans = 0, t = k, l = 0, r = 2 * n - 1;
//	while (--t)
//		ans += arr[r--] - arr[l++];
//	while (l < r)
//	{
//		ans += arr[l + 1] - arr[l];
//		l += 2;
//	}
//	cout << ans << ' ';
//}
	cout << endl;
}

signed main()
{
	int t; cin >> t;
	while (t--) solve();
	return 0;
}

//4 10 14 18

//1-2 3-4 5-6 7-8
//1 2-3 4-5 6-7 8
//1 2 3-4 5-6 7 8
//1 2 3 4-5 6 7 8

//1 4 1 2 3 4 5 6 7 8

//3 1 32 78 2 4 5 6 9 4 6149048 26582657 36124499 43993239 813829899 860114890 910238130 913669539